package com.github.chain.admin.server.controller;

import com.github.chain.admin.common.domain.AdminLogger;
import com.github.framework.core.page.DataPage;
import com.github.chain.admin.common.request.AdminLoggerRequest;
import com.github.chain.admin.server.service.AdminLoggerService;
import com.github.framework.core.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author AIQ
 * @date 2023/5/25
 * @project er-trader
 */
@RestController
public class AdminLoggerController {

    @Resource
    private AdminLoggerService adminLoggerService;

    @PostMapping("/findLogByPage")
    Result<DataPage<AdminLogger>> findLogByPage(@RequestBody AdminLoggerRequest adminLoggerRequest){
        return adminLoggerService.findLogByPage(adminLoggerRequest);
    }


    @PostMapping
    Result<Integer> insertSelective(@RequestBody AdminLogger adminLogger){
        return adminLoggerService.insertSelective(adminLogger);
    }
}
